\hypertarget{class_spring}{
\section{Spring Class Reference}
\label{class_spring}\index{Spring@{Spring}}
}


a spring object connecting 2 particles  




{\ttfamily \#include $<$Spring.h$>$}



Collaboration diagram for Spring:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=600pt]{class_spring__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_spring_a751cea7f06b8e24a1f65c8d28cccde35}{Spring} ()
\begin{DoxyCompactList}\small\item\em ctor \end{DoxyCompactList}\item 
\hyperlink{class_spring_a9d519174f5b6e0bf42c588dcc823bca1}{Spring} (\hyperlink{class_particle}{Particle} $\ast$\_\-rootNode, \hyperlink{class_particle}{Particle} $\ast$\_\-endNode, const float \_\-restLength, const \hyperlink{_spring_8h_ae5df13207e05e6661ba0e16d18d1f83e}{SpringType} \_\-springType)
\begin{DoxyCompactList}\small\item\em ctor \end{DoxyCompactList}\item 
\hyperlink{class_particle}{Particle} $\ast$ \hyperlink{class_spring_a067d20e11ddb180f4504d1db8b939f77}{getRootNode} () const 
\begin{DoxyCompactList}\small\item\em return the root node of the spring \end{DoxyCompactList}\item 
\hyperlink{class_particle}{Particle} $\ast$ \hyperlink{class_spring_a2d8d7cde652bb0b4912887125e865840}{getEndNode} () const 
\begin{DoxyCompactList}\small\item\em return the end node of the spring \end{DoxyCompactList}\item 
float \hyperlink{class_spring_ad6a98f12f96aaaa09edcc882f9ed48f7}{getRestLength} () const 
\begin{DoxyCompactList}\small\item\em return the rest length of the spring \end{DoxyCompactList}\item 
\hyperlink{_spring_8h_ae5df13207e05e6661ba0e16d18d1f83e}{SpringType} \hyperlink{class_spring_a82a4b0b8db140f00aaeb4ca9fc471565}{getSpringType} () const 
\begin{DoxyCompactList}\small\item\em return the type of the spring \end{DoxyCompactList}\item 
bool \hyperlink{class_spring_a7a1713e3356956a151df63af73734e25}{isValid} () const 
\begin{DoxyCompactList}\small\item\em return whether the spring is valid \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_particle}{Particle} $\ast$ \hyperlink{class_spring_a8c413d3f10f4a51c88df9cbc9becae95}{m\_\-rootNode}
\begin{DoxyCompactList}\small\item\em the root node of the spring \end{DoxyCompactList}\item 
\hyperlink{class_particle}{Particle} $\ast$ \hyperlink{class_spring_a9d5916c36dbd3b6981bb08aed98d61aa}{m\_\-endNode}
\begin{DoxyCompactList}\small\item\em the end node of the spring \end{DoxyCompactList}\item 
float \hyperlink{class_spring_a612ed8ef8bbdbb0bbe21039dd1b4786c}{m\_\-restLength}
\begin{DoxyCompactList}\small\item\em the rest length of the spring \end{DoxyCompactList}\item 
\hyperlink{_spring_8h_ae5df13207e05e6661ba0e16d18d1f83e}{SpringType} \hyperlink{class_spring_a4346c04a326c7cfd97f0c2ac81ddc5f1}{m\_\-springType}
\begin{DoxyCompactList}\small\item\em the type of the spring \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
a spring object connecting 2 particles 

Definition at line 26 of file Spring.h.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_spring_a751cea7f06b8e24a1f65c8d28cccde35}{
\index{Spring@{Spring}!Spring@{Spring}}
\index{Spring@{Spring}!Spring@{Spring}}
\subsubsection[{Spring}]{\setlength{\rightskip}{0pt plus 5cm}Spring::Spring (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}
\label{class_spring_a751cea7f06b8e24a1f65c8d28cccde35}


ctor 



Definition at line 20 of file Spring.cpp.



References m\_\-restLength.


\begin{DoxyCode}
{
    m_restLength = -1;
}
\end{DoxyCode}
\hypertarget{class_spring_a9d519174f5b6e0bf42c588dcc823bca1}{
\index{Spring@{Spring}!Spring@{Spring}}
\index{Spring@{Spring}!Spring@{Spring}}
\subsubsection[{Spring}]{\setlength{\rightskip}{0pt plus 5cm}Spring::Spring (
\begin{DoxyParamCaption}
\item[{{\bf Particle} $\ast$}]{\_\-rootNode, }
\item[{{\bf Particle} $\ast$}]{\_\-endNode, }
\item[{const float}]{\_\-restLength, }
\item[{const {\bf SpringType}}]{\_\-springType}
\end{DoxyParamCaption}
)}}
\label{class_spring_a9d519174f5b6e0bf42c588dcc823bca1}


ctor 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em \_\-rootNode} & the root node of the spring \\
\hline
\mbox{\tt in}  & {\em \_\-endNode} & the end particle of the spring \\
\hline
\mbox{\tt in}  & {\em \_\-restLength} & the rest length of the spring \\
\hline
\mbox{\tt in}  & {\em \_\-springType} & the type of spring \\
\hline
\end{DoxyParams}


Definition at line 7 of file Spring.cpp.


\begin{DoxyCode}
{
    m_rootNode = _rootNode;
    m_endNode = _endNode;
    m_restLength = _restLength;
    m_springType = _springType;
}
\end{DoxyCode}


\subsection{Member Function Documentation}
\hypertarget{class_spring_a2d8d7cde652bb0b4912887125e865840}{
\index{Spring@{Spring}!getEndNode@{getEndNode}}
\index{getEndNode@{getEndNode}!Spring@{Spring}}
\subsubsection[{getEndNode}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Particle}$\ast$ Spring::getEndNode (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_spring_a2d8d7cde652bb0b4912887125e865840}


return the end node of the spring 



Definition at line 49 of file Spring.h.



References m\_\-endNode.


\begin{DoxyCode}
{ return m_endNode; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_spring_a2d8d7cde652bb0b4912887125e865840_icgraph}
\end{center}
\end{figure}


\hypertarget{class_spring_ad6a98f12f96aaaa09edcc882f9ed48f7}{
\index{Spring@{Spring}!getRestLength@{getRestLength}}
\index{getRestLength@{getRestLength}!Spring@{Spring}}
\subsubsection[{getRestLength}]{\setlength{\rightskip}{0pt plus 5cm}float Spring::getRestLength (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_spring_ad6a98f12f96aaaa09edcc882f9ed48f7}


return the rest length of the spring 



Definition at line 52 of file Spring.h.



References m\_\-restLength.


\begin{DoxyCode}
{ return m_restLength; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_spring_ad6a98f12f96aaaa09edcc882f9ed48f7_icgraph}
\end{center}
\end{figure}


\hypertarget{class_spring_a067d20e11ddb180f4504d1db8b939f77}{
\index{Spring@{Spring}!getRootNode@{getRootNode}}
\index{getRootNode@{getRootNode}!Spring@{Spring}}
\subsubsection[{getRootNode}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Particle}$\ast$ Spring::getRootNode (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_spring_a067d20e11ddb180f4504d1db8b939f77}


return the root node of the spring 



Definition at line 46 of file Spring.h.



References m\_\-rootNode.


\begin{DoxyCode}
{ return m_rootNode; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_spring_a067d20e11ddb180f4504d1db8b939f77_icgraph}
\end{center}
\end{figure}


\hypertarget{class_spring_a82a4b0b8db140f00aaeb4ca9fc471565}{
\index{Spring@{Spring}!getSpringType@{getSpringType}}
\index{getSpringType@{getSpringType}!Spring@{Spring}}
\subsubsection[{getSpringType}]{\setlength{\rightskip}{0pt plus 5cm}{\bf SpringType} Spring::getSpringType (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_spring_a82a4b0b8db140f00aaeb4ca9fc471565}


return the type of the spring 



Definition at line 55 of file Spring.h.



References m\_\-springType.


\begin{DoxyCode}
{ return m_springType; }
\end{DoxyCode}


Here is the caller graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{class_spring_a82a4b0b8db140f00aaeb4ca9fc471565_icgraph}
\end{center}
\end{figure}


\hypertarget{class_spring_a7a1713e3356956a151df63af73734e25}{
\index{Spring@{Spring}!isValid@{isValid}}
\index{isValid@{isValid}!Spring@{Spring}}
\subsubsection[{isValid}]{\setlength{\rightskip}{0pt plus 5cm}bool Spring::isValid (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{class_spring_a7a1713e3356956a151df63af73734e25}


return whether the spring is valid 



Definition at line 58 of file Spring.h.



References m\_\-restLength.


\begin{DoxyCode}
{ return m_restLength != -1; }
\end{DoxyCode}


\subsection{Member Data Documentation}
\hypertarget{class_spring_a9d5916c36dbd3b6981bb08aed98d61aa}{
\index{Spring@{Spring}!m\_\-endNode@{m\_\-endNode}}
\index{m\_\-endNode@{m\_\-endNode}!Spring@{Spring}}
\subsubsection[{m\_\-endNode}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Particle}$\ast$ {\bf Spring::m\_\-endNode}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_spring_a9d5916c36dbd3b6981bb08aed98d61aa}


the end node of the spring 



Definition at line 65 of file Spring.h.

\hypertarget{class_spring_a612ed8ef8bbdbb0bbe21039dd1b4786c}{
\index{Spring@{Spring}!m\_\-restLength@{m\_\-restLength}}
\index{m\_\-restLength@{m\_\-restLength}!Spring@{Spring}}
\subsubsection[{m\_\-restLength}]{\setlength{\rightskip}{0pt plus 5cm}float {\bf Spring::m\_\-restLength}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_spring_a612ed8ef8bbdbb0bbe21039dd1b4786c}


the rest length of the spring 



Definition at line 68 of file Spring.h.

\hypertarget{class_spring_a8c413d3f10f4a51c88df9cbc9becae95}{
\index{Spring@{Spring}!m\_\-rootNode@{m\_\-rootNode}}
\index{m\_\-rootNode@{m\_\-rootNode}!Spring@{Spring}}
\subsubsection[{m\_\-rootNode}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Particle}$\ast$ {\bf Spring::m\_\-rootNode}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_spring_a8c413d3f10f4a51c88df9cbc9becae95}


the root node of the spring 



Definition at line 62 of file Spring.h.

\hypertarget{class_spring_a4346c04a326c7cfd97f0c2ac81ddc5f1}{
\index{Spring@{Spring}!m\_\-springType@{m\_\-springType}}
\index{m\_\-springType@{m\_\-springType}!Spring@{Spring}}
\subsubsection[{m\_\-springType}]{\setlength{\rightskip}{0pt plus 5cm}{\bf SpringType} {\bf Spring::m\_\-springType}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_spring_a4346c04a326c7cfd97f0c2ac81ddc5f1}


the type of the spring 



Definition at line 71 of file Spring.h.



The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
include/\hyperlink{_spring_8h}{Spring.h}\item 
src/\hyperlink{_spring_8cpp}{Spring.cpp}\end{DoxyCompactItemize}
